import request from '@/utils/request'

// 查询基金分配主表列表
export function listFundFpSpvMain(query) {
  return request({
    url: '/fpSpv/fundFpSpvMain/list',
    method: 'get',
    params: query
  })
}

// 查询基金分配主表列表 (不分页)
export function listFundFpSpvMainAll(query) {
  return request({
    url: '/fpSpv/fundFpSpvMain/listAll',
    method: 'get',
    params: query
  })
}

// 查询基金分配主表详细
export function getFundFpSpvMain(id) {
  return request({
    url: '/fpSpv/fundFpSpvMain/' + id,
    method: 'get'
  })
}
// 查询基金分配主表详细
export function getMaxQici(query) {
  return request({
    url: '/fpSpv/fundFpSpvMain/getMaxQici',
    method: 'get',
    params: query
  })
}

// 保存基金分配主表
export function saveFundFpSpvMain(data) {
  return request({
    url: '/fpSpv/fundFpSpvMain/save',
    method: 'post',
    data: data
  })
}

// 删除基金分配主表
export function delFundFpSpvMain(id) {
  return request({
    url: '/fpSpv/fundFpSpvMain/' + id,
    method: 'delete'
  })
}

// 导出基金分配主表
export function exportFundFpSpvMain(query) {
  return request({
    url: '/fpSpv/fundFpSpvMain/export',
    method: 'get',
    params: query
  })
}

// 获取税前累计金额 按照 出资人名称
export function getCumulativeAmountBeforeTax(spvId, fpId) {
  return request({
    url: '/fpSpv/fundFpSpvMain/getCumulativeAmountBeforeTax/' + spvId + '/' + fpId,
    method: 'get'
  })
}
